Benjamin Otte [Sat, 18 May 2019 14:11:19 +0000 (16:11 +0200)]
widget: Make gtk_widget_render() static
Benjamin Otte [Wed, 15 May 2019 20:18:56 +0000 (22:18 +0200)]
flattenlistmodel: Do proper check
If we want the model items to be listmodels, we don't need to do a ==
comparison. We need to do g_type_is_a(). Implementations of listmodels
are obviously fine.
Matthias Clasen [Mon, 13 May 2019 19:09:26 +0000 (19:09 +0000)]
Merge branch 'openbsd-pid_get_parent' into 'master'
pid_get_parent: fix for OpenBSD
See merge request GNOME/gtk!841
Antoine Jacoutot [Mon, 13 May 2019 18:47:46 +0000 (20:47 +0200)]
pid_get_parent: fix for OpenBSD
This fixes a long standing bug in pid_get_parent on OpenBSD (which was mine
so... my fault). kp wasn't properly allocated and the function could return
random failures.
Matthias Clasen [Mon, 13 May 2019 17:31:19 +0000 (17:31 +0000)]
Merge branch 'modifier-events' into 'master'
key controller: Don't eat modifier events
Closes #1884
See merge request GNOME/gtk!839
Matthias Clasen [Mon, 13 May 2019 17:01:51 +0000 (17:01 +0000)]
key controller: Don't eat modifier events
The key controller was consuming key events
for modifier keys, for no entirely convincing
reason, which leads to problems when somebody
actually listens for those, such as the simple
input method does for C-S-u processing.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1884
Piotr Drąg [Mon, 13 May 2019 16:59:18 +0000 (18:59 +0200)]
Update POTFILES.in
Matthias Clasen [Mon, 13 May 2019 02:39:37 +0000 (02:39 +0000)]
Merge branch 'default-decoration-dialogs' into 'master'
dialog: Use default decoration for non-custom headerbars
See merge request GNOME/gtk!836
Benjamin Otte [Sun, 12 May 2019 23:23:50 +0000 (23:23 +0000)]
Merge branch 'wip/otte/for-master' into 'master'
Wip/otte/for master
See merge request GNOME/gtk!838
Benjamin Otte [Sun, 12 May 2019 22:59:15 +0000 (00:59 +0200)]
rendernodeparser: Move EOF test into parse_declarations()
This way, we don't have to duplicate code.
Plus, we can ensure to clear the erroneously parsed value that should
not be used.
Benjamin Otte [Sun, 12 May 2019 22:47:50 +0000 (00:47 +0200)]
rendernodeparser: Introduce clear_func
We want to be able to clear the already parsed contents, because we need
to do that when somebody parses the same property twice.
Florian Müllner [Sun, 12 May 2019 09:58:22 +0000 (09:58 +0000)]
dialog: Use default decoration for non-custom headerbars
There are two ways GTK can add a headerbar to a dialog:
- the dialog is constructed with the :use-header-bar property
- all windows should use client-side decorations
In the first case, the headerbar is added by GtkDialog with no
dedicated style class, and in the latter by GtkWindow with the
"default-decoration" style.
As a result, dialogs with plain titlebars can end up with clearly
distinct and inconsistent styles.
To address this, allow headerbars to track whether they should use
the "default-decoration" style and enable it for dialogs.
https://gitlab.gnome.org/GNOME/gtk/merge_requests/836
Matthias Clasen [Sun, 12 May 2019 18:19:36 +0000 (18:19 +0000)]
about dialog: Fix page visibility
The handling of page visibility broke when the dialog
was ported to GtkStackPage in
52b83ac5530940bf17bc.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1877
Matthias Clasen [Sun, 12 May 2019 18:00:19 +0000 (18:00 +0000)]
Reinstate the activate-focus keybinding
Commit
3b62d9c027186fe0fddfb9 was a bit overzealous in
removing not just the public API for activating the focus
widget, but also the plumbing needed to make the keybinding
work.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1879
Benjamin Otte [Sun, 12 May 2019 16:27:47 +0000 (16:27 +0000)]
Merge branch 'wip/otte/for-master' into 'master'
Wip/otte/for master
See merge request GNOME/gtk!832
Benjamin Otte [Sun, 12 May 2019 14:01:15 +0000 (16:01 +0200)]
rendernodeparser: Default color to black
Nobody wants to render transparent text.
Benjamin Otte [Sun, 12 May 2019 13:18:46 +0000 (15:18 +0200)]
cssparser: Make gsk_renderer_consume_url() return a string
We don't want to return a GFile because GFile can't handle can't deal
with data: urls.
That makes the code a bit more complicated that doesn't deal with those
URLs, but it makes the other code actually work.
GtkCssImageUrl also now decodes data urls immediately instead of only at
the first load. So don't use data urls if you care about performance.
Benjamin Otte [Sun, 12 May 2019 11:14:50 +0000 (13:14 +0200)]
rendernodeparser: Use parser blocks
Instead of trying to do error handling manually, use the semicolon
blocks feature provided by GtkCssParser.
Benjamin Otte [Fri, 10 May 2019 15:09:59 +0000 (17:09 +0200)]
cssparser: Don't allow commit_token() on block EOF
When we're at the end of a block and gtk_css_parser_get_token() returns
NULL, gtk_css_parser_commit_token() still consumed the next token.
It does not anymore.
This does not affect the CSS parser, but it exposes issues with the
render parser, which previously just consumed too many closing } tokens
in the past.
Benjamin Otte [Fri, 10 May 2019 13:00:12 +0000 (15:00 +0200)]
testsuite: Stop using g_test_bug()
The calls used old bugzilla URLs and nobody cared about that.
So apparently they are very unused.
There's also a potential conflict between gitlab and bugzilla URLs and
what base bug to use there.
The old usages have been converted to comments.
Benjamin Otte [Fri, 10 May 2019 03:09:12 +0000 (05:09 +0200)]
node-editor: Report all errors in tooltip
Don't just report the first one.
Benjamin Otte [Fri, 10 May 2019 02:55:36 +0000 (04:55 +0200)]
node-editor: Don't remove all text tags when saving
Benjamin Otte [Thu, 9 May 2019 13:13:03 +0000 (15:13 +0200)]
testsuite: Don't die on the first error
Continue running the test, just mark it as a failure.
Benjamin Otte [Thu, 9 May 2019 01:56:25 +0000 (03:56 +0200)]
rendernodeparser: Parse images differently
Instead of encoding the raw data, encode the full image to a PNG.
And instead of stuffing that encoding into a string, use a full
data: url.
And then remove the width and height properties, because they're now
implicitly included in the data.
And then change the parser to match.
And because the parser now parses regular urls on top of data: urls, we
can now load any random file.
Benjamin Otte [Thu, 9 May 2019 01:11:48 +0000 (03:11 +0200)]
css: Add data URL parsing to images
Benjamin Otte [Thu, 9 May 2019 01:04:21 +0000 (03:04 +0200)]
css: Add gtk_css_data_url_parse()
This surprisingly decodes data URLs.
Benjamin Otte [Fri, 10 May 2019 00:54:24 +0000 (02:54 +0200)]
rendernode: Set EXTEND_PAD when drawing textures
Christoph Reiter [Fri, 10 May 2019 14:19:16 +0000 (14:19 +0000)]
Merge branch 'ci-master-fedora-30' into 'master'
CI: update docker image to Fedora 30
See merge request GNOME/gtk!802
Christoph Reiter [Tue, 30 Apr 2019 13:15:47 +0000 (15:15 +0200)]
CI: update docker image to fedora 30
So we don't have to build glib as a subproject.
Matthias Clasen [Wed, 8 May 2019 21:45:17 +0000 (21:45 +0000)]
settings: Update docs
We no longer create settings on demand.
Matthias Clasen [Wed, 8 May 2019 21:40:29 +0000 (21:40 +0000)]
css provider: Stop mentioning key themes
We no longer do this.
Benjamin Otte [Wed, 8 May 2019 16:18:11 +0000 (18:18 +0200)]
glrenderer: Ensure current context for debug stuff
Benjamin Otte [Wed, 8 May 2019 15:28:50 +0000 (17:28 +0200)]
rendernode: Parse repeat nodes
Benjamin Otte [Wed, 8 May 2019 15:17:51 +0000 (17:17 +0200)]
node-editor: Never scale nodes up
Scaling down is fine so one can see the nodes, but scaling up just
makes the nodes wrong for no reason at all.
Matthias Clasen [Wed, 8 May 2019 16:58:11 +0000 (16:58 +0000)]
Drop the public profiler api
I meant to do this before merging the profiler
support. Somehow the commit got lost.
Matthias Clasen [Wed, 8 May 2019 16:57:34 +0000 (16:57 +0000)]
Profiler: drop the public api
Matthias Clasen [Wed, 8 May 2019 16:49:47 +0000 (16:49 +0000)]
profiler: Update the D-Bus interface name
Sysprof is bumping its name to Sysprof3, so
lets change to that before this gets used.
Matthias Clasen [Wed, 8 May 2019 14:47:08 +0000 (14:47 +0000)]
Correct theme loading docs
The docs were failing to mention the VARIANT.
Matthias Clasen [Wed, 8 May 2019 14:33:23 +0000 (14:33 +0000)]
css provider: Remove outdated version check
When looking for versioned theme files, we were
looking for directories names gtk-4.x for x
bigger than 14, which mades sense for GTK 3,
but we are starting out at 0 again, so remove
this check.
Matthias Clasen [Wed, 8 May 2019 04:01:45 +0000 (04:01 +0000)]
Merge branch 'inspector-css' into 'master'
Inspector css
See merge request GNOME/gtk!830
Matthias Clasen [Wed, 8 May 2019 03:34:14 +0000 (03:34 +0000)]
Improve the action editor more
Matthias Clasen [Wed, 8 May 2019 02:44:24 +0000 (02:44 +0000)]
inspector: Fix showing the frame clock
We want to go to the object, not just select it
in the list (which does not even contain frame clocks).
Matthias Clasen [Wed, 8 May 2019 02:27:31 +0000 (02:27 +0000)]
Merge branch 'inspector-css' into 'master'
inspector: Port actions to a list view
See merge request GNOME/gtk!829
Matthias Clasen [Wed, 8 May 2019 02:20:18 +0000 (02:20 +0000)]
inspector: Port actions to a list view
Chun-wei Fan [Wed, 8 May 2019 00:55:03 +0000 (17:55 -0700)]
gdk/gdkprofiler.c: Don't include unistd.h unconditionally
unistd.h is not universally available, so only include it when it can be
found during the configure stage.
Benjamin Otte [Tue, 7 May 2019 23:11:27 +0000 (01:11 +0200)]
build: Fix
I did somethig wrong there. Whoops
Benjamin Otte [Tue, 7 May 2019 18:47:20 +0000 (20:47 +0200)]
csstokenizer: Add more testcases
Benjamin Otte [Tue, 7 May 2019 06:56:28 +0000 (08:56 +0200)]
csstokenizer: Handle backslash at end of document
Testcases included.
Matthias Clasen [Tue, 7 May 2019 22:21:02 +0000 (22:21 +0000)]
Merge branch 'inspector-css' into 'master'
inspector: Style the property list
See merge request GNOME/gtk!828
Matthias Clasen [Tue, 7 May 2019 22:04:41 +0000 (22:04 +0000)]
inspector: Style the property list
Make the property list look more like a list.
Matthias Clasen [Tue, 7 May 2019 18:57:44 +0000 (18:57 +0000)]
Merge branch 'gdk-win32-unimplement-vfuncs' into 'master'
GdkSurface - Don't call unimplemented NULL set_startup_id() vfunc on Win32
See merge request GNOME/gtk!825
Matthias Clasen [Tue, 7 May 2019 18:41:22 +0000 (18:41 +0000)]
emoji chooser: Name the idle
We recently added an idle that does quite a bit of work.
It should have a name.
Sebastian Dröge [Tue, 7 May 2019 06:53:51 +0000 (09:53 +0300)]
GdkSurface - Don't call unimplemented NULL set_startup_id() vfunc on Win32
GdkSurface::set_startup_id() is NULL on Win32 and would cause a segfault
if called.
While the documentation of the main caller of set_startup_id(),
gtk_window_set_startup_id(), mentions that it's not implemented on
Windows it can still be automatically called via Glade and simply doing
nothing on Win32 is going to be less disruptive than a segfault.
Matthias Clasen [Tue, 7 May 2019 18:37:11 +0000 (18:37 +0000)]
Merge branch 'tracing' into 'master'
Tracing
See merge request GNOME/gtk!563
Matthias Clasen [Mon, 6 May 2019 20:30:20 +0000 (13:30 -0700)]
Add docs
Document the various ways to start profiling.
Matthias Clasen [Sat, 19 May 2018 19:36:00 +0000 (20:36 +0100)]
GtkApplication: Add a profiler dbus api
Implement the org.gnome.Sysprof2.Profiler D-Bus
api to let sysprof start and stop tracing at runtime,
and get the data directly, via a passed fd.
Matthias Clasen [Sat, 19 May 2018 19:35:02 +0000 (20:35 +0100)]
gsk: Add tracing to the vulkan renderer
Emit the equivalent of the cpu-time counter, as well
as pixel numbers i the inspector.
Matthias Clasen [Sat, 19 May 2018 19:25:17 +0000 (20:25 +0100)]
gsk: Add tracing to the gl renderer
Emit the equivalent of the cpu-time counter in the inspector.
Matthias Clasen [Sat, 19 May 2018 19:26:21 +0000 (20:26 +0100)]
gsk: Add some more profiler apis
Add a way to extract the start time of timers.
This will let us reuse the profiler timers for tracing.
Matthias Clasen [Sat, 19 May 2018 19:24:21 +0000 (20:24 +0100)]
frame clock: Add tracing
Emit tracing data for frames. For now, we emit the
entire frame, and the layout and paint phases. Also
emit frames-per-second.
Matthias Clasen [Sat, 19 May 2018 18:42:11 +0000 (19:42 +0100)]
Add a way to start the profiler
If SYSPROF_TRACE_FD is set in the environment,
interpret it as an fd to write profiling data
to.
If GTK_TRACE is set, write profiling data
to a file with name gtk.$PID.syscap.
Matthias Clasen [Sat, 19 May 2018 18:35:42 +0000 (19:35 +0100)]
gdk: Add a profiler
This is writing data in the capture format of sysprof,
using the SpCaptureWriter. For now, this is using a
vendored copy of libsysprof. Eventually, we want to
use the static library that sysprof provides.
Marek Kašík [Tue, 7 May 2019 16:32:36 +0000 (16:32 +0000)]
Merge branch 'cups-deprecation-warnings' into 'master'
Fix deprecation warnings when building the CUPS print backend
See merge request GNOME/gtk!739
Emmanuele Bassi [Mon, 6 May 2019 19:04:17 +0000 (20:04 +0100)]
Require CUPS >= 2.0
Drop support for versions of CUPS < 2.0, to simplify the backend code
and drop a lot of conditional blocks.
Emmanuele Bassi [Fri, 12 Apr 2019 17:00:02 +0000 (18:00 +0100)]
cups: Use non-deprecated API
The http* family of functions was deprecated after CUPS 1.7. We can
conditionally use it when built against a newer version of CUPS. The
additional parameters are taken directly from the fallback values
inside CUPS itself.
Emmanuele Bassi [Fri, 12 Apr 2019 16:58:53 +0000 (17:58 +0100)]
Detect CUPS ≥ 1.7
We support CUPS ≥ 1.2, but we use API that was introduced and deprecated
at a later point.
Timm Bäder [Tue, 7 May 2019 15:20:11 +0000 (17:20 +0200)]
gl renderer: Fix blur nodes with radius 0
Timm Bäder [Tue, 7 May 2019 15:19:58 +0000 (17:19 +0200)]
node editor: Do some simple syntax highlighting
Timm Bäder [Tue, 7 May 2019 15:19:00 +0000 (17:19 +0200)]
testsuite: Add blur node testcase
Renderers need to handle blur radius 0 as well. Currently broken in GL
and (I guess, unless it's my driver) Vulkan.
Matthias Clasen [Tue, 7 May 2019 14:57:53 +0000 (14:57 +0000)]
Fix the compiler warning, again
Matthias Clasen [Tue, 7 May 2019 04:01:21 +0000 (04:01 +0000)]
Fix a compiler warning
Matthias Clasen [Tue, 7 May 2019 03:01:40 +0000 (03:01 +0000)]
3.96
Matthias Clasen [Tue, 7 May 2019 03:26:22 +0000 (03:26 +0000)]
Mark a failing reftest as xfail
I don't know why we expect different window types
to render identically in the first place.
Matthias Clasen [Mon, 6 May 2019 23:33:13 +0000 (23:33 +0000)]
Update a11y tests
Matthias Clasen [Tue, 7 May 2019 02:20:29 +0000 (02:20 +0000)]
a11y: Stop using child-notify
This was showing up in the accessibility tests failing.
Matthias Clasen [Mon, 6 May 2019 22:20:51 +0000 (22:20 +0000)]
widget: Revert the event translation change
This is a temporary revert to make menus work
in the 3.96 release, until we land the popup
surface work and port menus to it.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1755
Benjamin Otte [Mon, 6 May 2019 18:24:49 +0000 (18:24 +0000)]
Merge branch 'wip/headers' into 'master'
Wip/headers
See merge request GNOME/gtk!824
Benjamin Otte [Mon, 6 May 2019 18:09:52 +0000 (20:09 +0200)]
broadway: Install headers
How are we going to check a display for its broadway-ness otherwise?
Benjamin Otte [Mon, 6 May 2019 18:09:03 +0000 (20:09 +0200)]
build: Install the backend headers in the backend directories
That's where they are in the sources and we include them from other
headers. So make sure the directories match.
Piotr Drąg [Mon, 6 May 2019 16:55:40 +0000 (18:55 +0200)]
Update POTFILES.skip
Timm Bäder [Mon, 6 May 2019 15:58:55 +0000 (17:58 +0200)]
gl renderer: Fix coloring shader
We *just* pre-multiplied u_color but then didn't use its rgb values.
This fixes backdrop scale marks in Adwaita to not be white.
Timm Bäder [Mon, 6 May 2019 15:33:48 +0000 (17:33 +0200)]
gl renderer: Fix blend shader
Timm Bäder [Mon, 6 May 2019 15:33:29 +0000 (17:33 +0200)]
testsuite: Add blend-difference test case
Comparing blend nodes with mode: difference
Timm Bäder [Mon, 6 May 2019 15:26:46 +0000 (17:26 +0200)]
testsuite: Add a blend node test case
This is currently broken in the GL renderer.
Timm Bäder [Sat, 4 May 2019 07:22:01 +0000 (09:22 +0200)]
Some node editor improvements
Matthias Clasen [Mon, 6 May 2019 14:17:17 +0000 (14:17 +0000)]
Merge branch 'header-bar-leak4' into 'master'
GtkHeaderBar: Don't leak decoration layout
See merge request GNOME/gtk!822
Emmanuele Bassi [Mon, 6 May 2019 12:01:47 +0000 (12:01 +0000)]
Merge branch 'issue-1863' into 'master'
Allow setting the GtkLayoutManager type per-class
Closes #1863
See merge request GNOME/gtk!821
Emmanuele Bassi [Mon, 6 May 2019 11:15:21 +0000 (12:15 +0100)]
Make get_layout_manager_type() public
The inspector, and other tools introspecting the widget structure like
gtk-builder-tool and Glade, may very well want to access the default
layout manager used by a class, especially if there are layout
properties involved, without having a whitelist of widget/layout manager
associations.
Emmanuele Bassi [Mon, 6 May 2019 11:06:27 +0000 (12:06 +0100)]
Use gtk_widget_class_set_layout_manager_type()
Instead of manually creating the layout manager inside the instance
initialization function, we can let GtkWidget do that for us.
Guido Günther [Mon, 6 May 2019 10:55:16 +0000 (12:55 +0200)]
GtkHeaderBar: Don't leak decoration layout
Currently we leak priv->decoration_layout if the layout is set
multiple times.
Emmanuele Bassi [Mon, 6 May 2019 10:57:32 +0000 (11:57 +0100)]
Allow specifying the layout manager for a widget type
Some widgets have a well-defined layout manager created alongside their
own instance; if they do, we can handle the layout manager creation at
the GtkWidget instantiation.
Benjamin Otte [Mon, 6 May 2019 03:56:06 +0000 (05:56 +0200)]
csstokenizer: Consume the \ when encountering an error
Otherwise we infinitely end up with the error again.
Testcases added.
Matthias Clasen [Sun, 5 May 2019 20:19:13 +0000 (20:19 +0000)]
Merge branch 'simplify-tests' into 'master'
Simplify tests
See merge request GNOME/gtk!820
Matthias Clasen [Sun, 5 May 2019 15:29:24 +0000 (15:29 +0000)]
Add some tests
These test various aspects of ui file conversion.
Matthias Clasen [Sun, 5 May 2019 17:09:17 +0000 (17:09 +0000)]
builder-tool: Handle layout properties more properly
Change things so we first rewrite the whole tree,
and then simplify the rewritten tree. And look
for paramspecs for layout properties.
Matthias Clasen [Sun, 5 May 2019 15:49:28 +0000 (15:49 +0000)]
builder-tool: Stop warnings for stack rewrites
When rewriting a GtkStack from 3 to 4, we were emitting
warnings for missing child properties. Stop doing that.
Matthias Clasen [Sun, 5 May 2019 15:23:59 +0000 (15:23 +0000)]
testsuite: Add tests for ui file rewriting
Add a test script that runs
gtk4-builder-tool simplify --3to4.
No actual tests yet.
Matthias Clasen [Sun, 5 May 2019 15:21:58 +0000 (15:21 +0000)]
Fix the simplify test
The script was returning the wrong number of tests.
Matthias Clasen [Sun, 5 May 2019 14:20:04 +0000 (14:20 +0000)]
Merge branch 'focus-fixes' into 'master'
Focus fixes
See merge request GNOME/gtk!819
Piotr Drąg [Sun, 5 May 2019 14:11:04 +0000 (16:11 +0200)]
Update POTFILES.skip